package com.lagou.homework2.no3;

/**
 * 手机卡类 特征：卡类型、卡号、用户名、密码、账户余额、通话时长(分钟)、上网流量 行为：显示（卡号 + 用户名 + 当前余额）
 */

public class IcCards {
    //卡类型
    private String cardType;
    //卡号
    private String cardNum;
    //用户名
    private String userName;
    //密码
    private String password;
    //账户余额
    private double account;
    //通话时长
    private int talkTime;
    //上网流量
    private int internetTraffic;
    //生成无参构造器
    public IcCards() {
    }
    //生成有参构造器
    public IcCards(String cardType, String cardNum, String userName, String password, double account, int talkTime, int internetTraffic) {
        this.cardType = cardType;
        this.cardNum = cardNum;
        this.userName = userName;
        this.password = password;
        this.account = account;
        this.talkTime = talkTime;
        this.internetTraffic = internetTraffic;
    }

    public String getCardType() {
        return cardType;
    }

    public void setCardType(String cardType) {
        this.cardType = cardType;
    }

    public String getCardNum() {
        return cardNum;
    }

    public void setCardNum(String cardNum) {
        this.cardNum = cardNum;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public double getAccount() {
        return account;
    }

    public void setAccount(double account) {
        this.account = account;
    }

    public int getTalkTime() {
        return talkTime;
    }

    public void setTalkTime(int talkTime) {
        this.talkTime = talkTime;
    }

    public int getInternetTraffic() {
        return internetTraffic;
    }

    public void setInternetTraffic(int internetTraffic) {
        this.internetTraffic = internetTraffic;
    }
    //行为
    public void show(){
        System.out.println("卡号："+getCardNum()+",用户名："+getUserName()+".当前余额："+getAccount());
    }
}
